package com.imooc.ecommerce.dao;

import com.imooc.ecommerce.entity.EcommerceUser;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * <p>EcommerceUser DAO 接口定义
 *
 * @author Yaxi.Zhang
 * @since 2022/11/1 22:52
 */
public interface EcommerceUserDao extends JpaRepository<EcommerceUser, Long> {

    /**
     * 根据用户名查询 EcommerceUser 对象
     */
    EcommerceUser findByUsername(String username);

    /**
     * 根据用户名和密码查询实体对象
     */
    EcommerceUser findByUsernameAndPassword(String username, String password);
}
